<template>
  <div id="nav">
    App
    <!-- 使用跟模块 -->
    <p>{{ $store.state.username }}</p>
    <p>{{ $store.getters.newName }}</p>
  </div>
  <router-view/>
</template>

<script>
import { useStore } from 'vuex'
export default {
  setup () {
    const store = useStore()
    console.log(store.state.username)
  }
}
</script>

<style lang="less">
</style>
